package org.sag.mallbf.type;

public enum ElementType {
    FLOATPOINT(1),
    UINT(2),
    INT(3),
    CLAMPEDINT(4);

    private int value;

    ElementType(int value) {
        this.value = value;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public static ElementType get(int value) {
        for (ElementType e : values()) {
            if (e.getValue() == value) {
                return e;
            }
        }
        return FLOATPOINT;
    }
}
